package mine.aop_spri_aspectj;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import mine.aop.Greeting;

/**
 * Created by james on 16/2/5.
 */
public class GreetingAspectDecMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        Greeting greeting = (Greeting) context.getBean("greetingImpl");
        greeting.sayHello("JACK");

        Apology apology = (Apology) greeting;
        apology.saySorry("JACK");
    }
}
